package com.dao;

import com.pojo.Member;
import org.apache.ibatis.annotations.Select;

public interface MemberDao {
    /*根据号码查询看看是不是我们的会员*/
    @Select("select * from t_member where phoneNumber=#{telephone}")
    Member findMemberByTelephone(String telephone);
/*根据预约信息新建会员*/
    void addMember(Member member);
/* <!--根据日期统计会员数，统计指定日期之后的会员数-->*/
    @Select(" select count(id) from t_member where regTime <= #{value}")
    Integer findMemberCountBeforeDate(String date);
    /*本日新增*/
    @Select("SELECT COUNT(1) FROM t_member WHERE regTime=#{date}")
    int todayNewMember(String date);
    //会员总数
    @Select("SELECT COUNT(1) FROM t_member")
    int totalMember();
    //指定日期之后的会员
    @Select("SELECT COUNT(1) FROM t_member WHERE regTime>=#{s}")
    int findMemberCountAfterDate(String s);
}
